The geometric model of a certain oil and gas mixed transportation pipeline was established with OLGA software, and the transient flow law during the pipeline shutdown and restart process was studied. First, the distribution characteristics of temperature, pressure and liquid holdup along the pipeline during steady state operation were analyzed, and the location of the minimum temperature and the location of the maximum pressure along the pipeline were determined. The influence of environmental temperature and shutdown time on operating parameters were analyzed. The safe shutdown time when the minimum temperature temperature is higher than its freezing point was determined. In the actual operation process, the shutdown time should not exceed the safe shutdown time, otherwise problems such as pipeline condensation and excessive starting pressure will easily occur, which threaten the safety of the pipeline.